<template>
  <div class="header">
    <div class="menu fl">
      <img src="./menu.png" alt="">
    </div>
    <div class="nav">
        <mu-bottom-nav :value="bottomNav" @change="handleChange">
          <mu-bottom-nav-item value="music" title="music" to="/music"/>
          <mu-bottom-nav-item value="main" title="main" to="/main"/>
          <mu-bottom-nav-item value="user" title="user" to="/user"/>
        </mu-bottom-nav>
    </div>
    <div class="search fr">
      <img src="./search.png" alt="">
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  export default{
    data () {
      return {
        bottomNav: 'main'
      }
    },
    methods: {
      handleChange (val) {
        this.bottomNav = val
      }
    }
  }
</script>

<style>
  .header{
    height: 4rem;
    background: #C20C0C;
    text-align: center;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 10;
  }
  .header .menu,.header .search{
    width: 2rem;
    height: 2rem;
    margin: 1rem;
  }
  .header img{
    width: 2rem;
  }
  .header .nav{
    display: inline-block;
    line-height: 3rem;
  }
  .header .mu-bottom-nav{
    background: #C20C0C;
    height: 4rem;
  }
  .header .mu-buttom-item{
    color: #ccc;
  }
  .header .mu-bottom-item-text{
    font-size: 1.4rem;
  }
  .header .mu-bottom-item-active .mu-bottom-item-text{
    color: #fff;
  }
</style>
